import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('SunManager')
export class SunManager extends Component {
    private static _instance: SunManager = null;
    @property(Number)
    private sunPoint: number = 0;
    public get SunPoint(): number {
        return this.sunPoint;
    }
    public static getInstance(): SunManager {
        return SunManager._instance;
    }
    protected onLoad(): void {
        if (SunManager._instance === null) {
            SunManager._instance = this;
        } else {
            console.error('Cannot have more than one instance of SunManager');
            this.node.destroy();
            return;
        }
    }
    start() {

    }

    update(deltaTime: number) {

    }
}

